{extend name="public:layout" /}
{block name="title"}
{eq name="Request.param.order_type" value="1"}
即将开始
{/eq}
{eq name="Request.param.order_type" value="2"}
正在进行
{/eq}
{eq name="Request.param.order_type" value="3"}
已结束
{/eq}
订单列表
{/block}
{block name="head"}
	<style>
		body{font-family: Arial,"Microsoft Yahei";}
	</style>
{/block}
{block name="body"}
<div class="tabs wx_tabs">
    <a href="/system/op/index.html?mid=14&tpl=lb_plan&order_type=1" {eq name="Request.param.order_type" value="1"}class="active"{/eq}>即将开始</a>
    <a href="/system/op/index.html?mid=14&tpl=lb_plan&order_type=2" {eq name="Request.param.order_type" value="2"}class="active"{/eq}>正在进行</a>
    <a href="/system/op/index.html?mid=14&tpl=lb_plan&order_type=3" {eq name="Request.param.order_type" value="3"}class="active"{/eq}>已完成</a>
</div>
<article style="bottom: 0;" class="mescroll" id="mescroll">
    <div class="weui_cells weui_cells_access" id="content-slide"></div>
</article>

<!--返回首页-->
<div class="back_index">
	<a href="/system">
		<img class="back_img" src="/public/mobile/static/images/back1.png" />
	</a>
</div>
{/block}
{block name="script"}
	<script id="test" type="text/html">  
		<!--模板-->

    	{{ each rows}} 
    	<div class="weui_cell list_weui_cells xz_list" style="border-bottom:15px solid #e8e8e8;">
            <div class="weui_cell_bd weui_cell_primary">
                <div class="wuliao-title">
                    <label>{{ $value.title }}</label>
                    <span>-{{ $value.car_sn }}</span>
                </div>

                <div class="detail clearfix">
                    <span class="date">开始日期：<label style="color:#989898">{{ $value.order_start_time }}</label></span>
                    {{ if $value.car_status>=1 }}
                    <br><span class="date">实际出发：<label>{{ $value.out_time }}</label></span>
                    {{ /if }}
                    <span class="date">结束日期：<label style="color:#989898">{{ $value.order_end_time }}</label></span>
                    {{ if $value.car_status>=2 }}
                    <br><span class="date">实际结束：<label>{{ $value.back_time }}</label></span>
                    {{ /if }}
                    <span class="date">客户：<label>{{ $value.order_client }}{{ $value.order_phone }}</label></span>
                </div>

                <div style="padding:10px;">
                    {{ if $value.car_status==0 }}
                    <a href="{:url('Op/edit',['tpl'=>'lb_order_start'])}&mid={{ $value.mid }}&aid={{ $value.aid }}" class="weui-btn weui-btn_primary">查看更多信息</a>
                    {{ /if }}
                    {{ if $value.car_status==1 }}
                    <a href="{:url('Op/edit',['tpl'=>'lb_order_end'])}&mid={{ $value.mid }}&aid={{ $value.aid }}" class="weui-btn weui-btn_primary">查看更多信息</a>
                    {{ /if }}
                    {{ if $value.car_status==2 }}
                    <a href="{:url('Op/edit',['tpl'=>'lb_order_ended'])}&mid={{ $value.mid }}&aid={{ $value.aid }}" class="weui-btn weui-btn_primary">查看更多信息</a>
                    {{ /if }}
                </div>
                
            </div>
       </div>
	    {{ /each }}
	</script>  
	<script type="text/javascript">
		$(function () {
		    var order_type="{$Request.param.order_type}";
            initPage('content-slide','/system/logic.query/driverorder.html?mid=14',{order_type:order_type,data_type:1},'test');
        });
        
        (function (doc, win) {
		    var docEl = doc.documentElement,
		    resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
		    recalc = function () {
		      var clientWidth = docEl.clientWidth;
		      if (!clientWidth) return;
		      docEl.style.fontSize = 20 * (clientWidth / 320) + 'px';
		    };
		
		  if (!doc.addEventListener) return;
		  win.addEventListener(resizeEvt, recalc, false);
		  doc.addEventListener('DOMContentLoaded', recalc, false);
		})(document, window);
	</script>
	
{/block}
